package com.phrp.controller;

import com.phrp.service.HouseRecordService;
import com.phrp.util.returnResult.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ssc
 * @since 2024-05-05
 */
@RestController
@RequestMapping("/api/houseRecord")
public class HouseRecordController {

    @Autowired
    private HouseRecordService houseRecordService;

    /**
     * 获取数据，通过传输的类型判断是否查询的是部分数据
     * @return
     */
    @GetMapping(value = "getApplyPassData")
    public ResponseResult getApplyPassData(@RequestParam String type){
        return houseRecordService.getApplyPassData(type);
    }

    /**
     * 根据身份证搜索内容
     * @param identity
     * @return
     */
    @GetMapping(value = "searchData")
    public ResponseResult searchData(@RequestParam("identity")String identity){
        return houseRecordService.searchData(identity);
    }
}
